﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="车主发布长途拼车.aspx.cs" Inherits="carpool.lixioacheng.车主发布长途拼车" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="../datepicker/css/datepicker.css" rel="stylesheet" />
    <link href="../datepicker/css/layout.css" rel="stylesheet" /> 
    <script src="../js/jquery-3.3.1.min.js"></script> 
    <script src="../datepicker/js/jquery.js"></script>
    <script src="../datepicker/js/datepicker.js"></script>
    <script src="../datepicker/js/eye.js"></script>
    <script src="../datepicker/js/utils.js"></script>
  <%--  <script src="../datepicker/js/layout.js"></script>--%>
   <script type="text/javascript">
       $(function () {


       });

       function Show() {
           // console.log(  $("#date"));
           alert($('#date').DatePickerGetDate('m/d/Y'));
       }

       //异步请求传值传入后台
       $(function () {
           $("btn_fabu").click(function () {
               var rili = $("#date").val();//获取日历控件的选中时间
               var xkl = $("#xlk").val();//获取下拉框的时间段
               $.ajax({
                   type: "post",

                   //语法：data: {"参数名1"：值1,参数名2：值2,参数名3：值3.....}
                   data:{"data":rili,"xlk":xkl},
                   //data: $("#form1").serialize(),
                   dataType: "json",//返回数据的格式
                   success: function (result) {
                       alert(result.msg);
                       if (result.code == "1") {
                           //跳转首页
                           alert("添加成功！");
                       }

                   }//异步请求成功回调函数
               })
           })
       });
   </script>
    <style type="text/css">
        *{
            padding:0;margin:0;
        }
        body{
            font-size:16px;
        }
        #tb_tishi{
            display:flex;
            border:1px solid #f85252;
            background-color:#ff8181;
            width:80%;margin:0 auto;
             margin-top:10px;
            height:45px;
            text-align:center;
        }
        .auto-style1 {
            height: 38px;
        }
     #btn_fabu{
         background-color:#2fa3de;
         border:1px solid #2fa3de;
         height:35px;
         width:150px;
         margin-left:160px;
         margin-top:10px;
     }
     #btn_chezhu{
         margin-top:30px;
         background-color:#2fa3de;
     }
     #btn_chengke{
         margin-left:40px;
          background-color:#2fa3de;
     }
     #da{
         margin-top:10px;
     }
    #rili{
        margin-left:570px;
        margin-top:15px;
    }
    #lb_time{
        position:absolute;
        left:455px;
        bottom:400px;
    }
    #xlk{
         position:absolute;
        margin-top:-100px;
         left:800px;
    }
    #Label3{
        position:absolute;
         left:455px;
    }
    #Label4{
         position:absolute;
         left:455px;
         margin-top:10px;
    }
    #Label5{
         position:absolute;
           left:455px;
           margin-top:20px;
    }
    #tb_addren{
        margin-left:-120px;
        margin-top:10px;
    }
    #tb_rongna{
         margin-left:-120px;
        margin-top:20px;
    }
    #DropDownList1{
        margin-left:-120px;
    }
    #city{
        margin-top:15px;
    }
    </style>
    
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Button ID="btn_chezhu" runat="server" Text="我是车主" Width="160px" Height="35px"/>
            <asp:Button ID="btn_chengke" runat="server" Text="我是乘客" Width="160px" Height="35px" />
        </div>
      <asp:TextBox ID="tb_tishi" runat="server" Text="在您发布后，这条拼车和您联系方式会通过手机短信或邮件推送给关注此路线的所有乘客"></asp:TextBox>
<div id="da">
  <%--  <div>
        <asp:Label ID="Label3" runat="server" Text="驾驶人身份："></asp:Label>
        <asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList>
    </div>--%>
        <div id="city">
        <asp:Label ID="Label1" runat="server" Text="出发城市："></asp:Label>
        <asp:TextBox ID="tb_gocity" runat="server"></asp:TextBox>
         <asp:Label ID="Label2" runat="server" Text="目的城市："></asp:Label>
        <asp:TextBox ID="tb_mudi" runat="server"></asp:TextBox>
    </div> 
    <div><asp:Label ID="lb_time" runat="server" Text="出发时间："></asp:Label></div>
         <div id="rili">
       <p id="date"></p>		
			<pre><script type="text/javascript">$('#date').DatePicker({
    flat: true,
    date: '2020-01-01',
    current: '2020-01-01',
    calendars: 1,
    starts: 1,
    format: 'Y-m-d'
});</script>
       
			</pre>
          <select id="xlk">
              <option>早上06：00-10：00</option>
               <option>中午12：00-16：00</option>
               <option>晚上18：00-20：00</option>
          </select>
    </div>
         <div>
        <asp:Label ID="Label4" runat="server" Text="参加人数："></asp:Label>
        <asp:TextBox ID="tb_addren" runat="server"></asp:TextBox>
    </div>
          <div>
        <asp:Label ID="Label5" runat="server" Text="容纳人数："></asp:Label>
        <asp:TextBox ID="tb_rongna" runat="server"></asp:TextBox>
    </div>
    <br />
          <div>
        <asp:Label ID="Label6" runat="server" Text="汽车类型："></asp:Label>
              <asp:RadioButton ID="rb_car" runat="server" Text="轿车" GroupName="car" />
                 <asp:RadioButton ID="rb_mpv" runat="server" Text="MPV" GroupName="car" />
                 <asp:RadioButton ID="rb_suv" runat="server" Text="SUV" GroupName="car" />
                 <asp:RadioButton ID="rb_paoche" runat="server" Text="跑车" GroupName="car" />
                 <asp:RadioButton ID="rb_keche" runat="server" Text="客车" GroupName="car" />
                 <asp:RadioButton ID="rb_qita" runat="server" Text="其他" GroupName="car" />
    </div>
    <br />
         <div>
        <asp:Label ID="Label7" runat="server" Text="费用方式："></asp:Label>
         <asp:RadioButton ID="rb_free" runat="server" Text="免费" GroupName="money" />
              <asp:RadioButton ID="rb_mianyi" runat="server" Text="面议" GroupName="money" />
              <asp:RadioButton ID="rb_yikoujia" runat="server" Text="一口价" GroupName="money" />
             <asp:TextBox ID="tb_money" runat="server"></asp:TextBox><span>元/位</span>
    </div>
    <br />
           <div>
        <asp:Label ID="lb_liuyan" runat="server" Text="车主留言："> </asp:Label> <span>0/500</span>
             
        <asp:TextBox ID="tb_chezhu" runat="server" TextMode="MultiLine"></asp:TextBox><br />
              
    </div>
        <div>
            <asp:Button ID="btn_fabu" runat="server" Text="立即发布" OnClick="btn_fabu_Click"/></div>
    </div>
        <div><input type="button" onclick="Show();" value="显示时间"/></div>
    </form>
</body>
</html>
